﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Bot.Dynamics365.Model
{
    public class Option
    {
        public string odatatype { get; set; }
        public int Value { get; set; }
        public object Color { get; set; }
        public bool IsManaged { get; set; }
        public object ExternalValue { get; set; }
        public object[] ParentValues { get; set; }
        public object MetadataId { get; set; }
        public object HasChanged { get; set; }
        public int State { get; set; }
        public object TransitionData { get; set; }
        public Label Label { get; set; }
        public Description Description { get; set; }
        public string Title
        {
            get
            {
                if(Label!=null
                    && Label.LocalizedLabels!=null
                    && Label.LocalizedLabels.Length > 0)
                {
                    return Label.LocalizedLabels[0].Label;
                }

                return Convert.ToString(Value);
            }
        }
    }

}
